#ifndef CPACKAGE
#define CPACKAGE

#include "CVisualEntity.h"

namespace csmodel
{
    class CPackage : public CVisualEntity
    {
    public:
        typedef CVisualEntity inherited;
        CPackage( CEntity * anOwner, int _id = 1 ) : inherited ( 0, _id) { if( anOwner ) anOwner->Insert( this ); }
        CPackage( CEntity * anOwner, const QString & name ) : inherited ( 0, 1 ) { if( anOwner ) anOwner->Insert( this ); Name( name ); }

    protected:
        CPackage( const CPackage & src ) {}
        CPackage() {}
        //CEntity* CreateClone() const { return new CPackage( *this ); }
        ~CPackage() {}

    public:
        virtual void Draw( IDrawEngine & di ) const {}

        QRect Bounds() const { return GetGlobalDims(); }
        CBoundsKind BoundsKind() const { return bkNonBounds; }

        virtual void GetProperties( CProperties* map );

        const ClassVisualTraits* VisualTraits() const { return GetVisualTraits(); }
        static ClassVisualTraits* GetVisualTraits() { return visualTraits; }
        static void SetVisualTraits( ClassVisualTraits * v ) { visualTraits = v; }

        void FreeInstance() throw() { delete this; }

    private:
        static ClassVisualTraits* visualTraits;
    };
}

#endif // CPACKAGE
